package basic;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.TreeMap;

/**
 * Created by luzl on 4/8/2017.
 */
public class ListTest {
    public static void main(String[] args){
        LinkedList<String> list=new LinkedList<String>();
        list.add("1");
        list.add("2");
        System.out.println(list.get(1));

        TreeMap map=new TreeMap();
        map.put("g","x");
        map.put("z","x");
        map.put("a","x");
        Iterator<String> keys=map.keySet().iterator();
        while (keys.hasNext()){
            System.out.println(keys.next());
        }
    }
}
